package com.gwz.context;

import java.util.Properties;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

/**
 * 重写spring默认解析properties
 * 
 * @author panguixiang
 *
 */
public class CustomizedPropertyConfigurer extends PropertyPlaceholderConfigurer {

	protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)
			throws BeansException {
		super.processProperties(beanFactoryToProcess, props);
		for (Object key : props.keySet()) {
			PropertiesMap.setMapProValue(key.toString(), props.getProperty(key.toString()));
		}
	}
}
